package com.webinsky.article.service;

import java.util.List;
import java.util.Map;

import com.webinsky.article.domain.MisArticle;
import com.webinsky.article.domain.MisArticleFilter;
import com.webinsky.article.domain.MisArticleFlowDescription;
import com.webinsky.article.domain.MisArticleImage;
import com.webinsky.article.domain.MisArticleOpSample;
import com.webinsky.article.domain.MisArticleRelate;
import com.webinsky.article.domain.MisArticleRelateVideo;
import com.webinsky.article.domain.MisArticleTag;
import com.webinsky.article.domain.MisArticleType;
import com.webinsky.article.domain.MisArticleVideo;
import com.webinsky.article.domain.MisArticles;
import com.webinsky.article.domain.MisExcelArticle;
import com.webinsky.common.proj.Lang;

public interface ArticleManagement {
	/**
	 * 导入excel数据
	 * 
	 * @param artiles
	 */
	void createExcelArticles(Map<Integer, List<MisExcelArticle>> artiles, int siteId, Lang lang);
	/**
	 * @param bookMode
	 * @return
	 */
	Map<String, Map<String, Integer>> getSiteIdArticleData(int siteId);
	/**
	 * @param filter
	 * @param detail
	 * @return
	 */
	MisArticles getExcelArticles(MisArticleFilter filter, boolean detail);
	/**
	 * 根据filter取得文章信息(分页)
	 * @param filter
	 * @return
	 */
	MisArticles getArticles(MisArticleFilter filter, boolean detail);
	/**
	 * 取得article的信息
	 * @param articleId
	 * @return
	 */
	MisArticle getArticle(int articleId, boolean detail);
	/**
	 * 根据ids取得文章信息
	 * @param articleIds
	 * @return
	 */
	List<MisArticle> getArticles(List<Integer> articleIds, boolean detail);
	/**
	 * @param articleIds
	 * @param modify
	 */
	void batchfixCanModify(List<Integer> articleIds, int modify);
	/**
	 * 新加文章信息
	 * @param article
	 */
	void addArticle(MisArticle article);
	/**
	 * 添加流程简述
	 * @param description
	 */
	void addFlowDescription(MisArticleFlowDescription description);
	/**
	 * 添加操作范例
	 * @param opSample
	 */
	void addOpSample(MisArticleOpSample opSample);
	/**
	 * 添加视频
	 * @param video
	 */
	void addVideo(MisArticleVideo video);
	/**
	 * 添加图片
	 * @param image
	 */
	void addImage(MisArticleImage image);
	/**
	 * 添加相关文章
	 * @param relateArticle
	 */
	void addRelateArticle(MisArticleRelate relateArticle);
	/**
	 * 添加相关视频
	 * @param relateVideo
	 */
	void addRelateVideo(MisArticleRelateVideo relateVideo);
	/**
	 * 删除相关video关系
	 * 
	 * @param viodeId
	 */
	void deleteRelateVideoByVideIs(int viodeId);
	/**
	 * 添加tag
	 * @param tag
	 */
	void addRelateTag(MisArticleTag tag);
	/**
	 * 删除文章
	 * @param id
	 * @param type
	 */
	void deleteArticle(int id, MisArticleType type);
	/**
	 * 检查自定义编号，文件名字或则标题是否已经存在
	 * @param name
	 * @return
	 */
	boolean isExsit(int siteId, String lang, String no, String title, String fileName);
	/**
	 * @param bookMode
	 * @param lang
	 * @return
	 */
	int getArticleCountBySiteIdAndLang(int siteId, Lang lang);
}